package com.developer.platform.controller;

import com.developer.platform.application.query.dto.ResponseModel;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

/**
 * @author ：qiaoliang
 * @date ：2020-10-20
 */
public class BaseController {


    public <T> ResponseEntity<ResponseModel<T>> ok(ResponseModel<T> responseModel){
        return ResponseEntity.status(HttpStatus.OK)
                .body(responseModel);
    }

    public <T> ResponseEntity<T> ok(T t){
        return ResponseEntity.status(HttpStatus.OK)
                .body(t);
    }

}
